home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / adikit.arc / DOS.MAC < prev    next >
Encoding:
Text File  |  1986-12-01  |  2.5 KB  |  120 lines

  1. ;**
  2. ;
  3. ; This macro library defines the operating environment for the 8086 model
  4. ; that allows 1Mbytes of program and 64Kbytes of data.
  5. ;
  6. ;**
  7. MSDOS   EQU     2
  8.  
  9. ;**
  10. ;
  11. ; The following symbols define the 8086 memory mode being used.  Set LPROG
  12. ; to 1 for a large program segment (greater than 64K-bytes), and set LDATA
  13. ; to 1 for a large data segment.  Set COM to 1 to generate .COM files
  14. ; instead of .EXE files.  Note that if COM is not zero, then LPROG and
  15. ; LDATA must be 0.
  16. ;
  17. ;**
  18. COM     EQU     0
  19. LPROG   EQU     1
  20. LDATA   EQU     0
  21.  
  22. ;**
  23. ;
  24. ; The following symbols are established via LPROG and LDATA as follows:
  25. ;
  26. ;       S8086   set for small model (small prog, small data)
  27. ;       D8086   set for model with large data, small prog
  28. ;       P8086   set for model with large prog, small data
  29. ;       L8086   set for large model
  30. ;
  31. ;**
  32.         IF      (LPROG EQ 0) AND (LDATA EQ 0)
  33. S8086   EQU     1
  34. D8086   EQU     0
  35. P8086   EQU     0
  36. L8086   EQU     0
  37.         ENDIF
  38.  
  39.         IF      (LPROG EQ 0) AND (LDATA NE 0)
  40. S8086   EQU     0
  41. D8086   EQU     1
  42. P8086   EQU     0
  43. L8086   EQU     0
  44.         ENDIF
  45.  
  46.         IF      (LPROG NE 0) AND (LDATA EQ 0)
  47. S8086   EQU     0
  48. D8086   EQU     0
  49. P8086   EQU     1
  50. L8086   EQU     0
  51.         ENDIF
  52.  
  53.         IF      (LPROG NE 0) AND (LDATA NE 0)
  54. S8086   EQU     0
  55. D8086   EQU     0
  56. P8086   EQU     0
  57. L8086   EQU     1
  58.         ENDIF
  59.  
  60.  
  61. ;**
  62. ;
  63. ; The DSEG and PSEG macros are defined to generate the appropriate GROUP
  64. ; and SEGMENT statements for the memory model being used.  The ENDDS and
  65. ; ENDPS macros are then used to end the segments.
  66. ;
  67. ;**
  68. DSEG    MACRO   
  69. DGROUP  GROUP   DATA
  70. DATA    SEGMENT WORD PUBLIC 'DATA'
  71.         ASSUME  DS:DGROUP
  72.         ENDM
  73. ENDDS   MACRO
  74. DATA    ENDS
  75.         ENDM
  76.  
  77.         IF      S8086
  78. PSEG    MACRO
  79. PGROUP  GROUP   PROG
  80. PROG    SEGMENT BYTE PUBLIC 'PROG'
  81.         ASSUME  CS:PGROUP
  82.         ENDM
  83. ENDPS   MACRO
  84. PROG    ENDS
  85.         ENDM
  86.         ENDIF
  87.  
  88.         IF      D8086
  89. PSEG    MACRO
  90. CGROUP  GROUP   CODE
  91. CODE    SEGMENT BYTE PUBLIC 'CODE'
  92.         ASSUME  CS:CGROUP
  93.         ENDM
  94. ENDPS   MACRO
  95. CODE    ENDS
  96.         ENDM
  97.         ENDIF
  98.  
  99.         IF      P8086
  100. PSEG    MACRO
  101. _CODE   SEGMENT BYTE
  102.         ASSUME  CS:_CODE
  103.         ENDM
  104. ENDPS   MACRO
  105. _CODE   ENDS
  106.         ENDM
  107.         ENDIF
  108.  
  109.         IF      L8086
  110. PSEG    MACRO
  111. _PROG   SEGMENT BYTE
  112.         ASSUME  CS:_PROG
  113.         ENDM
  114. ENDPS   MACRO
  115. _PROG   ENDS
  116.         ENDM
  117.         ENDIF
  118.  
  119. args    equ     [bp+6]          ; argument location on stack
  120.